package com.alibaba.entity;

/**
 * ExamId entity. 
 * @author kinglcc
 */

public class ExamId implements java.io.Serializable {

	// Fields

	private ExamStatus examStatus;
	private Question question;

	// Constructors

	/** default constructor */
	public ExamId() {
	}

	/** full constructor */
	public ExamId(ExamStatus examStatus, Question question) {
		this.examStatus = examStatus;
		this.question = question;
	}

	// Property accessors

	public ExamStatus getExamStatus() {
		return this.examStatus;
	}

	public void setExamStatus(ExamStatus examStatus) {
		this.examStatus = examStatus;
	}

	public Question getQuestion() {
		return this.question;
	}

	public void setQuestion(Question question) {
		this.question = question;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ExamId))
			return false;
		ExamId castOther = (ExamId) other;

		return ((this.getExamStatus() == castOther.getExamStatus()) || (this
				.getExamStatus() != null
				&& castOther.getExamStatus() != null && this.getExamStatus()
				.equals(castOther.getExamStatus())))
				&& ((this.getQuestion() == castOther.getQuestion()) || (this
						.getQuestion() != null
						&& castOther.getQuestion() != null && this
						.getQuestion().equals(castOther.getQuestion())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getExamStatus() == null ? 0 : this.getExamStatus()
						.hashCode());
		result = 37 * result
				+ (getQuestion() == null ? 0 : this.getQuestion().hashCode());
		return result;
	}

}